package edu.whut.mall.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @author wayne
 * @date 2020/05/15
 */
public class GroupBuyRule implements Serializable {
    private Long id;

    /**
     * 团购分类id
     */
    private Long categoryId;

    /**
     * 团购规则名称
     */
    private String ruleName;

    /**
     * 商品id
     */
    private Long productId;

    /**
     * 折扣比例
     */
    private BigDecimal discountRate;

    /**
     * 团购优惠价
     */
    private BigDecimal groupBuyPrice;

    /**
     * 限购数量
     */
    private Integer limitNumber;

    /**
     * 成功开团的人数要求
     */
    private Integer successPeopleNumber;

    /**
     * 已经成功开团的数量
     */
    private Integer successGroupNumber;

    /**
     * 未满足人数是否开团
     */
    private Integer overtimeClustering;

    /**
     * 此次开团状态
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 开团时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 成团有效时间
     */
    private Integer validTime;

    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public BigDecimal getDiscountRate() {
        return discountRate;
    }

    public void setDiscountRate(BigDecimal discountRate) {
        this.discountRate = discountRate;
    }

    public BigDecimal getGroupBuyPrice() {
        return groupBuyPrice;
    }

    public void setGroupBuyPrice(BigDecimal groupBuyPrice) {
        this.groupBuyPrice = groupBuyPrice;
    }

    public Integer getLimitNumber() {
        return limitNumber;
    }

    public void setLimitNumber(Integer limitNumber) {
        this.limitNumber = limitNumber;
    }

    public Integer getSuccessPeopleNumber() {
        return successPeopleNumber;
    }

    public void setSuccessPeopleNumber(Integer successPeopleNumber) {
        this.successPeopleNumber = successPeopleNumber;
    }

    public Integer getSuccessGroupNumber() {
        return successGroupNumber;
    }

    public void setSuccessGroupNumber(Integer successGroupNumber) {
        this.successGroupNumber = successGroupNumber;
    }

    public Integer getOvertimeClustering() {
        return overtimeClustering;
    }

    public void setOvertimeClustering(Integer overtimeClustering) {
        this.overtimeClustering = overtimeClustering;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getValidTime() {
        return validTime;
    }

    public void setValidTime(Integer validTime) {
        this.validTime = validTime;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", ruleName=").append(ruleName);
        sb.append(", productId=").append(productId);
        sb.append(", discountRate=").append(discountRate);
        sb.append(", groupBuyPrice=").append(groupBuyPrice);
        sb.append(", limitNumber=").append(limitNumber);
        sb.append(", successPeopleNumber=").append(successPeopleNumber);
        sb.append(", successGroupNumber=").append(successGroupNumber);
        sb.append(", overtimeClustering=").append(overtimeClustering);
        sb.append(", status=").append(status);
        sb.append(", remark=").append(remark);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", validTime=").append(validTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}